home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / fish / 001-100 / 001-025 / 003 / ff / poster < prev    next >
Text File  |  1995-03-17  |  2KB  |  53 lines

  1. Article 177 of mod.sources:
  2. ion: version B 2.10.2 9/17/84 chuqui version 1.9 3/12/85; site unisoft.UUCP
  3. Posting-Version: version B 2.10.2 9/3/84; site panda.UUCP
  4. Path: unisoft!lll-lcc!lll-crg!seismo!harvard!talcott!panda!sources-request
  5. From: sources-request@panda.UUCP
  6. Newsgroups: mod.sources
  7. Subject: ff: fast text formatter (part 1 of 2)
  8. Message-ID: <1139@panda.UUCP>
  9. Date: 28 Nov 85 16:32:36 GMT
  10. Date-Received: 29 Nov 85 04:24:01 GMT
  11. Sender: jpn@panda.UUCP
  12. Lines: 1049
  13. Approved: jpn@panda.UUCP
  14.  
  15. Mod.sources:  Volume 3, Issue 51
  16. Submitted by: decvax!wanginst!perlman
  17.  
  18.                  ff: A Fast Text Formatter
  19.  
  20. Here is ff, a fast text  formatter.  It fills a gap  between
  21. the fmt program in Berkeley UNIX and systems like nroff.  ff
  22. is sort  of an  inside-out  nroff.   There are  no  commands
  23. inside a file, but the common options like line width,  line
  24. spacing, indentation,  pagination,  etc., are  command  line
  25. options.  ff is a general  utility that lets you throw  away
  26. most uses of programs like pr, expand, and especially fmt.
  27.  
  28. There are  a lot  of options  for ff--some  would argue  too
  29. many--but they are necessary  to provide the  functionality.
  30. I make shell scripts that encode most of my needs.  Here  is
  31. the shell script I  am using to  format these paragraphs  (I
  32. have the filter bound to a function key; I go to the top  of
  33. the paragraph and type PF1).
  34.     exec ff -w 60 -j -B "     '*.@|" $*
  35. I have  scripts  for  centering  regions  and  for  indented
  36. paragraphs.   These  and  a  nice  one  for  making  program
  37. listings are listed in the manual entry.  emacs users  might
  38. find the centering  option useful, even  though many of  the
  39. other functions are built in to  emacs.  vi users will  find
  40. ff and option-variants on it much more useful.
  41.  
  42. ff really is fast--roughly  twice the speed  as fmt for  the
  43. formats fmt  supports.   For paginating  text, ff  is  about
  44. twice as fast as  pr.  The tab  expansion options on ff  are
  45. comparable to  those of  the  expand program,  but ff  is  a
  46. little slower than expand  on expanding tabs--it simply  has
  47. too many concerns that expand can ignore.  Still, ff is fast
  48. enough to bind  to keys in  emacs or vi  to filter  regions,
  49. making vi a passable wysiwyg editor.  One reason for this is
  50. extensive profiling and  optimization, some  by my  students
  51. for a programming efficiency assignment.
  52.  
  53.